{extend name="layout/layout"}
{block name="content"}
<main class="active">
    <div class="head_a1">
        <div class="layui-main">
            <div class="b1">
                <div class="t1">步驟二：票券設定( 付款方式 )</div>
                <a href="/" class="back_btn"><img src="__ROOT__/public/activity/images/out.png">返回首页</a>
            </div>
        </div>
    </div>
    <div class="main_a">
        <div class="layui-main">
            <div class="active_w active3 ">
                <p class="text-align-center ft18 mb60 ft-bold">請選擇付款方式</p>
                <form onsubmit="return false;" lay-filter="pay" class="layui-form">
                    <div class="content">
                        <div class=" layui-form-item">
                            <div class="label ">Stripe
                            </div>
                            <input type="checkbox" {if isset($pay_type) && in_array('Stripe',$pay_type)} checked {/if} name="pay_type[]" value="Stripe"
                                   title="接受VISA, MasterCard, JCB, UnionPay銀聯卡線上刷卡，僅開放給以美金與港幣收費的活動使用。">

                        </div>
                        <div class=" layui-form-item">
                            <div class="label ">Paypal
                            </div>
                            <input type="checkbox" {if isset($pay_type) && in_array('Paypal',$pay_type)} checked {/if}  name="pay_type[]" value="Paypal"
                                   title="paypal。">

                        </div>

                    </div>
                    <div class="mt100 d-flex jc-s al-c">
                        <a href="/activity/create/advanced.html" class="last-btn">
                            <img src="__ROOT__/public/activity/images/out1.png">返回上一步
                        </a>
                        <a href="javascript:;" onclick="goNext()">
                            <button class="layui-btn layui-bg-orange next-btn">下一步</button>
                        </a>
                    </div>
                </form>
            </div>

        </div>
    </div>
</main>

<script>
    function goNext() {
        var data = layui.form.val('pay')
     
        $.quickPost('{:url("/activity/create/pay")}', data).done(res => {
    
            location.href = '/activity/create/refund.html';
        });
    }

</script>

{/block}